<template>
	<view>
		<view style="width: 100%; height: 20rpx;background: #f6f6f6;"></view>
		<uni-steps
			style="padding: 20rpx 0;"
			activeColor="#FB8536"
			:options="[{ nodeName: '上传证件' }, { nodeName: '补全个人资料' }, { nodeName: '开卡完成' }]"
			:active="2"
		></uni-steps>
		<view class="row-css" style="margin: 30rpx; align-items: center;text-align: center;justify-content: center;">
			<image style="width: 115rpx;height: 115rpx;border-radius: 50%;overflow:hidden;" src="../../static/icon_ecco.png"></image>
			<view style="font-size: 36rpx;margin-left: 20rpx;">开户成功</view>
		</view>
		<view class="column-css" style="background: #FFF9EE;padding: 20rpx 0;">
			<view class="row-css view-centent">
				<view style="width: 180rpx;">账户类型</view>
				<view>平安银行电子II类户</view>
			</view>
			<!-- <view class="row-css view-centent">
				<view style="width: 180rpx;">开户网点</view>
				<view>{{ accountinfo.accountBranch }}</view>
			</view> -->
			<view class="row-css view-centent">
				<view style="width: 180rpx;">账户</view>
				<view>{{ accountinfo.accountNo }}</view>
			</view>
			<view class="row-css view-centent">
				<view style="width: 180rpx;">开户人</view>
				<view>{{ accountinfo.trueName }}</view>
			</view>
			<view class="row-css view-centent">
				<view style="width: 180rpx;">绑定手机号</view>
				<view>{{ accountinfo.mobileNo }}</view>
			</view>
			<!-- <view class="row-css view-centent">
				<view style="width: 180rpx;">住址</view>
				<view>{{ accountinfo.address }}</view>
			</view> -->
		</view>
		<view class="row-css" style="width: 100%;margin: 60rpx 0;">
			<button class="mini-btn" style="background: #FB8536;" type="primary" size="default" @click="onfinsh()">完成</button>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			trueName: '',
			idNo: '',
			accountNo: '',
			businessNo: '',
			accountinfo: {}
		};
	},
	methods: {
		onfinsh() {
			uni.navigateBack({
				delta: 1
			});
		},
		getinfo() {
			this.wxRequest({
				url: `${this.API}/mini/erLeiHu/getAccountInfo`,
				method: 'POST',
				data: {
					trueName: this.trueName,
					idNo: this.idNo,
					accountNo: this.accountNo,
					businessNo: this.businessNo
				},
				title: '查询中...',
				success: res => {
					console.log('==============', res);
					this.accountinfo = res.data.data;
				}
			});
		}
	},
	onLoad: function(options) {
		this.trueName = options.trueName;
		this.idNo = options.idNo;
		this.accountNo = options.accountNo;
		this.businessNo = options.businessNo;
		this.getinfo();
	},
	onUnload() {
		console.log('监听返回按钮事件');
		uni.navigateBack({
			delta: 2
		});
		// this.onback();
	}
};
</script>

<style>
page {
	background: #ffffff;
	font-size: 30rpx;
}

.row-css {
	display: flex;
	flex-direction: row;
}

.column-css {
	display: flex;
	flex-direction: column;
}

.view-centent {
	padding: 20rpx 10rpx;
	flex: 1;
	margin: 0 30rpx;
}
.mini-btn {
	width: 100%;
	background: #e04b28;
	font-size: 28rpx;
	padding: 10rpx 0;
	margin: 0 20rpx;
}
</style>
